/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PanelEthernet.java
 *
 * Created on 12/03/2011, 18:34:21
 */

package tsb.UI.Paneles.ROUTER;

import tsb.dominio.interfaces.MAC;
import tsb.dominio.interfaces.IP;
import tsb.dominio.excepciones.MACException;
import tsb.UI.Ventanas.VentanaDeError;
import tsb.dominio.enumeraciones.AsignacionIP;
import tsb.dominio.interfaces.RJ45Gigabit;


/**
 *
 * @author Federico Gomez
 */
public class PanelGigabitRJ45Router extends javax.swing.JPanel {

    /** Creates new form PanelEthernet */
    public PanelGigabitRJ45Router() {
        initComponents();
        
    }


//    public boolean verificar()
//    {
//        if(!this.panelEthernetRouter.verificar())
//           return false;
//
//       return true;
//    }
     
     public RJ45Gigabit getFibraOpticaGigabit()
    {
        boolean estado=this.panelEthernetRouter.estado();

       

        IP IP= this.panelEthernetRouter.getIP();

        IP mascara= this.panelEthernetRouter.getMascara();

        boolean autoDuplex= this.panelEthernetRouter.getAutoDuplex();
        boolean duplex=this.panelEthernetRouter.getDuplex();
        boolean esAuto= this.panelEthernetRouter.getAnchoAuto();
        int anchoBanda= this.panelEthernetRouter.getAnchoDeBanda();

        RJ45Gigabit et = new RJ45Gigabit(estado, anchoBanda, IP, mascara, duplex,esAuto, null);
        
        return et;
    }
     
     public void setAsignacion(AsignacionIP asigancion)
    {
//        this.panelEthernetRouter.setAsignacionIP(asigancion);
        
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        bgroupDuplex = new javax.swing.ButtonGroup();
        panelEthernetRouter = new tsb.UI.Paneles.ROUTER.PanelEthernetRouter();

        setBackground(new java.awt.Color(255, 255, 255));
        setBorder(javax.swing.BorderFactory.createTitledBorder("Gigabit RJ45"));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addComponent(panelEthernetRouter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelEthernetRouter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup bgroupDuplex;
    private tsb.UI.Paneles.ROUTER.PanelEthernetRouter panelEthernetRouter;
    // End of variables declaration//GEN-END:variables

}
